// 这是关于组织架构的api模块
import request from '@/utils/request'
// 获取部门列表
export const reqGetDepartments = () => request({
  method: 'get',
  url: '/company/department'
})

// 获取部门负责人列表
export const reqGetEmployeeSimple = () => request({
  method: 'get',
  url: '/sys/user/simple'
})
// 新增部门
export const reqAddDepartments = data => request({
  method: 'post',
  url: '/company/department',
  data
})
// 删除部门
export const reqDelDEpartment = (id) => request({
  method: 'delete',
  url: `/company/department/${id}`
})

// 根据id获取部门详情
export const reqGetDepartDetail = (id) => request({
  method: 'get',
  url: `/company/department/${id}`
})

// 更新部门详情
export const reqUpdateDept = (data) => request({
  method: 'put',
  url: `/company/department/${data.id}`,
  data
})
